#include <libpmemobj++/p.hpp>
using namespace pmem::obj;

/*
参考：https://pmem.io/blog/2016/01/c-bindings-for-libpmemobj-part-1-pmem-resident-variables/?ref=footer

*/

struct vector {
    p<int> x;
    p<int> y;
    p<int> z;
}
int main() {
    PMEMoid root = pmemobj_root(pop, sizeof (struct vector));
    struct vector </span>*vectorp = pmemobj_direct(root);
    TX_BEGIN(pop) {
        vectorp->x = 5;
        vectorp->y = 10;
        vectorp->z = 15;
    } TX_END
}

